﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeatherStationSys.Interface;

namespace Nimbus1._0Platform
{
    /// <summary>
    /// Nimbus1.0硬件平台持久化
    /// </summary>
    public class Nimbus1_0Persistent : IPersistent
    {
        private Dictionary<string, object> data = new Dictionary<string, object>();

        public Dictionary<string, string> Dictionary(string regExp)
        {
            throw new NotImplementedException();
        }

        public T Retrieve<T>(string name)
        {
            if (data.ContainsKey(name))
            {
                return (T)data[name];
            }
            return default(T);
        }

        public void Store<T>(string name, T t)
        {
            data.Add(name, t);
        }
    }
}
